from urllib.request import urlopen

# 请求并打印
res = urlopen('http://www.baidu.com/')
print(res.read().decode('utf-8'))